.\" This manpage has been automatically generated by docbook2man 
.\" from a DocBook document.  This tool can be found at:
.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> 
.\" Please send any bug reports, improvements, comments, patches, 
.\" etc. to Steve Cheng <steve@ggi-project.org>.
.TH "RPM" "8" "06 June 2001" "Red Hat, Inc." "Red Hat Linux"
.SH NAME
rpm \- RPM Package Manager
.SH SYNOPSIS
.SS "QUERYING AND VERIFYING PACKAGES:"
.PP

\fBrpm\fR {\fB-q|--query\fR} [\fBselect-options\fR] [\fBquery-options\fR]

\fBrpm\fR {\fB-V|--verify\fR} [\fBselect-options\fR] [\fB--nodeps\fR] [\fB--nofiles\fR] [\fB--nomd5\fR] [\fB--noscripts\fR]

\fBrpm\fR {\fB-K|--checksig\fR} [\fB--nogpg\fR] [\fB--nopgp\fR] [\fB--nomd5\fR] \fB\fIPACKAGE_FILE\fB\fR\fI ...\fR
.SS "INSTALLING, UPGRADING, AND REMOVING PACKAGES:"
.PP

\fBrpm\fR {\fB-i|--install\fR} [\fBinstall-options\fR] \fB\fIPACKAGE_FILE\fB\fR\fI ...\fR

\fBrpm\fR {\fB-U|--upgrade\fR} [\fBinstall-options\fR] \fB\fIPACKAGE_FILE\fB\fR\fI ...\fR

\fBrpm\fR {\fB-F|--freshen\fR} [\fBinstall-options\fR] \fB\fIPACKAGE_FILE\fB\fR\fI ...\fR

\fBrpm\fR {\fB-e|--erase\fR} [\fB--allmatches\fR] [\fB--nodeps\fR] [\fB--noscripts\fR] [\fB--notriggers\fR] [\fB--test\fR] \fB\fIPACKAGE_NAME\fB\fR\fI ...\fR
.SS "BUILDING PACKAGES:"
.PP

\fBrpm\fR {\fB-ba|-bb|-bp|-bc|-bi|-bl|-bs|-bt\fR} [\fBbuild-options\fR] \fB\fISPECFILE\fB\fR\fI ...\fR

\fBrpm\fR {\fB-ta|-tb|-tp|-tc|-ti|-tl|-ts\fR} [\fBbuild-options\fR] \fB\fITARBALL\fB\fR\fI ...\fR

\fBrpm\fR {\fB--rebuild|--recompile\fR} \fB\fISOURCEPKG\fB\fR\fI ...\fR

.SS "MISCELLANEOUS:"
.PP

\fBrpm\fR {\fB--initdb|--rebuilddb\fR}

\fBrpm\fR {\fB--addsign|--resign\fR} \fB\fIPACKAGE_FILE\fB\fR\fI ...\fR

\fBrpm\fR {\fB--querytags|--showrc\fR}

\fBrpm\fR {\fB--setperms|--setugids\fR} \fB\fIPACKAGE_NAME\fB\fR\fI ...\fR
.SS "SELECT-OPTIONS"
.PP

\fB[\fIPACKAGE_NAME\fB] [-a,--all]
[-f,--file\ \fIFILE\fB] [-g,--group\ \fIGROUP\fB] [-p,--package\ \fIPACKAGE_FILE\fB]
[--querybynumber\ \fINUMBER\fB] [--triggeredby\ \fIPACKAGE_NAME\fB]
[--whatprovides\ \fICAPABILITY\fB] [--whatrequires\ \fICAPABILITY\fB]\fR
.SS "QUERY-OPTIONS"
.PP

\fB[--changelog] [-c,--configfiles] [-d,--docfiles] [--dump] [--filesbypkg]
[-i,--info] [--last] [-l,--list] [--provides] [--qf,--queryformat\ \fIQUERYFMT\fB] [-R,--requires]
[--scripts] [-s,--state] [--triggers,--triggerscripts]\fR
.SS "INSTALL-OPTIONS"
.PP

\fB[--allfiles] [--badreloc] [--excludepath\ \fIOLDPATH\fB] [--excludedocs] [--force] [-h,--hash]
[--ignoresize] [--ignorearch] [--ignoreos] [--includedocs] [--justdb]
[--nodeps] [--noorder] [--noscripts] [--notriggers]
[--oldpackage] [--percent] [--prefix \fINEWPATH\fB] [--relocate\ \fIOLDPATH\fB=\fINEWPATH\fB]
[--replacefiles] [--replacepkgs] [--test]\fR
.SS "BUILD-OPTIONS"
.PP

\fB[--buildroot \fIDIRECTORY\fB] [--clean] [--nobuild] [--rmsource] [--rmspec]
[--short-circuit] [--sign] [--target\ \fIPLATFORM\fB]\fR
.SH "DESCRIPTION"
.PP
\fBrpm\fR is a powerful \fBPackage Manager\fR,
which can be used to build, install, query, verify, update, and
erase individual software packages.
A \fBpackage\fR consists of an archive of files and
meta-data used to install and erase the archive files. The meta-data
includes helper scripts, file attributes, and descriptive information
about the package.
\fBPackages\fR come in two varieties: binary packages,
used to encapsulate software to be installed, and source packages,
containing the source code and recipe necessary to produce binary
packages.
.PP
One of the following basic modes must be selected:
\fBQuery\fR,
\fBVerify\fR,
\fBSignature Check\fR,
\fBInstall/Upgrade/Freshen\fR,
\fBUninstall\fR,
\fBBuild Package\fR,
\fBBuild Package from Tarball\fR,
\fBRecompile Package\fR,
\fBInitialize Database\fR,
\fBRebuild Database\fR,
\fBResign\fR,
\fBAdd Signature\fR,
\fBSet Owners/Groups\fR,
\fBShow Querytags\fR, and
\fBShow Configuration\fR.
.SS "GENERAL OPTIONS"
.PP
These options can be used in all the different modes.
.TP
\fB-?, --help\fR
Print a longer usage message then normal.
.TP
\fB--version\fR
Print a single line containing the version number of \fBrpm\fR
being used. 
.TP
\fB--quiet\fR
Print as little as possible - normally only error messages will
be displayed.
.TP
\fB-v\fR
Print verbose information - normally routine progress messages will be
displayed.
.TP
\fB-vv\fR
Print lots of ugly debugging information.
.TP
\fB--rcfile \fIFILELIST\fB\fR
Each of the files in the colon separated
\fIFILELIST\fR
is read sequentially by \fBrpm\fR for configuration
information.
Only the first file in the list must exist, and tildes will be
expanded to the value of \fB$HOME\fR.
The default \fIFILELIST\fR is
\fI/usr/lib/rpm/rpmrc\fR:\fI/etc/rpmrc\fR:\fI~/.rpmrc\fR.
.TP
\fB--pipe \fICMD\fB\fR
Pipes the output of \fBrpm\fR to the command \fICMD\fR.
.TP
\fB--dbpath \fIDIRECTORY\fB\fR
Use the database in \fIDIRECTORY\fR rathen
than the default path \fI/var/lib/rpm\fR
.TP
\fB--root \fIDIRECTORY\fB\fR
Use the system rooted at \fIDIRECTORY\fR for all operations.
Note that this means the database will be read or modified under
\fIDIRECTORY\fR and any
\fB%pre\fR or
\fB%post\fR
scriptlet(s) are run after a chroot(2) to
\fIDIRECTORY\fR.
.SS "INSTALL AND UPGRADE OPTIONS"
.PP
The general form of an rpm install command is 
.PP
\fBrpm\fR {\fB-i|--install\fR} [\fBinstall-options\fR] \fB\fIPACKAGE_FILE\fB\fR\fI ...\fR
.PP
This installs a new package.
.PP
The general form of an rpm upgrade command is 
.PP
\fBrpm\fR {\fB-U|--upgrade\fR} [\fBinstall-options\fR] \fB\fIPACKAGE_FILE\fB\fR\fI ...\fR
.PP
This upgrades or installs the package currently installed
to a newer version.  This is the same as install, except
all other version(s) of the package are removed after the
new package is installed.
.PP
\fBrpm\fR {\fB-F|--freshen\fR} [\fBinstall-options\fR] \fB\fIPACKAGE_FILE\fB\fR\fI ...\fR
.PP
This will upgrade packages, but only if an earlier version
currently exists. The \fIPACKAGE_FILE\fR
may be specified as an
\fBftp\fR or
\fBhttp\fR URL,
in which case the package will be downloaded before being
installed. See \fBFTP/HTTP OPTIONS\fR
for information on \fBrpm\fR's internal
\fBftp\fR and
\fBhttp\fR
client support. 
.PP
.TP
\fB--allfiles\fR
Installs or upgrades all the missingok files in the package,
regardless if they exist.
.TP
\fB--badreloc\fR
Used with \fB--relocate\fR, permit relocations on
all file paths, not just those \fIOLDPATH\fR's
included in the binary package relocation hint(s).
.TP
\fB--excludepath \fIOLDPATH\fB\fR
Don't install files whose name begins with
\fIOLDPATH\fR.
.TP
\fB--excludedocs\fR
Don't install any files which are marked as documentation
(which includes man pages and texinfo documents).
.TP
\fB--force\fR
Same as using
\fB--replacepkgs\fR,
\fB--replacefiles\fR, and
\fB--oldpackage\fR.
.TP
\fB-h, --hash\fR
Print 50 hash marks as the package archive is unpacked.
Use with \fB-v|--verbose\fR for a nicer display.
.TP
\fB--ignoresize\fR
Don't check mount file systems for sufficient disk space before
installing this package.
.TP
\fB--ignorearch\fR
Allow installation or upgrading even if the architectures
of the binary package and host don't match.
.TP
\fB--ignoreos\fR
Allow installation or upgrading even if the operating
systems of the binary package and host don't match.
.TP
\fB--includedocs\fR
Install documentation files. This is the default behavior.
.TP
\fB--justdb\fR
Update only the database, not the filesystem.
.TP
\fB--nodeps\fR
Don't do a dependency check before installing or upgrading
a package.
.TP
\fB--noorder\fR
Don't reorder the packages for an install. The list of
packages would normally be reordered to satisfy dependancies.
.TP
\fB--noscripts\fR
.TP
\fB--nopre\fR
.TP
\fB--nopost\fR
.TP
\fB--nopreun\fR
.TP
\fB--nopostun\fR
Don't execute the scriptlet of the same name.
The \fB--noscripts\fR option is equivalent to

\fB--nopre\fR
\fB--nopost\fR
\fB--nopreun\fR
\fB--nopostun\fR

and turns off the execution of the corresponding
\fB%pre\fR,
\fB%post\fR,
\fB%preun\fR, and
\fB%postun\fR
scriptlet(s).
.TP
\fB--notriggers\fR
.TP
\fB--notriggerin\fR
.TP
\fB--notriggerun\fR
.TP
\fB--notriggerpostun\fR
Don't execute any trigger scriptlet of the named type.
The \fB--notriggers\fR option is equivalent to

\fB--notriggerin\fR
\fB--notriggerun\fR
\fB--notriggerpostun\fR

and turns off execution of the corresponding
\fB%triggerin\fR,
\fB%triggerun\fR, and
\fB%triggerpostun\fR
scriptlet(s).
.TP
\fB--oldpackage\fR
Allow an upgrade to replace a newer package with an older one.
.TP
\fB--percent\fR
Print percentages as files are unpacked from the package archive.
This is intended to make \fBrpm\fR easy to run from
other tools.
.TP
\fB--prefix \fINEWPATH\fB\fR
For relocatable binary packages, translate all file paths that
start with the installation prefix in the package relocation hint(s)
to \fINEWPATH\fR.
.TP
\fB--relocate \fIOLDPATH\fB=\fINEWPATH\fB\fR
For relocatable binary packages, translate all file paths
that start with \fIOLDPATH\fR in the
package relocation hint(s) to \fINEWPATH\fR.
This option can be used repeatedly if several
\fIOLDPATH\fR's in the package are to
be relocated.
.TP
\fB--replacefiles\fR
Install the packages even if they replace files from other,
already installed, packages.
.TP
\fB--replacepkgs\fR
Install the packages even if some of them are already installed
on this system.
.TP
\fB--test\fR
Do not install the package, simply check for and report
potential conflicts.
.SS "QUERY OPTIONS"
.PP
The general form of an rpm query command is 
.PP
\fBrpm\fR {\fB-q|--query\fR} [\fBselect-options\fR] [\fBquery-options\fR]
.PP
You may specify the format that package information should be
printed in. To do this, you use the
 {\fB--qf|--queryformat\fR} \fB\fIQUERYFMT\fB\fR
option, followed by the \fIQUERYFMT\fR
format string.  Query formats are modifed versions of the
standard \fBprintf(3)\fR formatting. The format
is made up of static strings (which may include standard C
character escapes for newlines, tabs, and other special
characters) and \fBprintf(3)\fR type formatters.
As \fBrpm\fR already knows the type to print, the
type specifier must be omitted however, and replaced by the name
of the header tag to be printed, enclosed by \fB{}\fR
characters. Tag names are case insesitive, and the
\fBRPMTAG_\fR portion of the tag name may be omitted
as well.
.PP
Alternate output formats may be requested by following
the tag with \fB:\fItypetag\fB\fR.
Currently, the following types are supported:
\fBoctal\fR,
\fBdate\fR,
\fBshescape\fR,
\fBperms\fR,
\fBfflags\fR, and
\fBdepflags\fR.
For example, to print only the names of the packages queried,
you could use \fB%{NAME}\fR as the format string.
To print the packages name and distribution information in
two columns, you could use \fB%-30{NAME}%{DISTRIBUTION}\fR.
\fBrpm\fR will print a list of all of the tags it knows about when it
is invoked with the \fB--querytags\fR argument.
.PP
There are two subsets of options for querying: package selection,
and information selection.
.SS "PACKAGE SELECTION OPTIONS:"
.PP
.TP
\fB\fIPACKAGE_NAME\fB\fR
Query installed package named \fIPACKAGE_NAME\fR.
.TP
\fB-a, --all\fR
Query all installed packages.
.TP
\fB-f, --file \fIFILE\fB\fR
Query package owning \fIFILE\fR.
.TP
\fB-g, --group \fIGROUP\fB\fR
Query packages with the group of \fIGROUP\fR.
.TP
\fB-p, --package \fIPACKAGE_FILE\fB\fR
Query an (uninstalled) package \fIPACKAGE_FILE\fR.
The \fIPACKAGE_FILE\fR may be specified
as an \fBftp\fR or \fBhttp\fR style URL, in
which case the package header will be downloaded and queried.
See \fBFTP/HTTP OPTIONS\fR for information on
\fBrpm\fR's internal
\fBftp\fR and
\fBhttp\fR
client support. The \fIPACKAGE_FILE\fR argument(s),
if not a binary package, will be interpreted as an ASCII package
manifest.  Comments are permitted, starting with a '#', and each
line of a package manifest file may include white space seperated
glob expressions, including URL's with remote glob expressions,
that will be expanded to paths that are substituted in place of
the package manifest as additional \fIPACKAGE_FILE\fR
arguments to the query.
.TP
\fB--querybynumber \fINUMBER\fB\fR
Query the \fINUMBER\fRth database entry
directly; this is useful only for debugging.
.TP
\fB--specfile \fISPECFILE\fB\fR
Parse and query \fISPECFILE\fR as if
it were a package. Although not all the information (e.g. file lists)
is available, this type of query permits rpm to be used to extract
information from spec files without having to write a specfile
parser.
.TP
\fB--triggeredby \fIPACKAGE_NAME\fB\fR
Query packages that are triggered by package(s)
\fIPACKAGE_NAME\fR.
.TP
\fB--whatprovides \fICAPABILITY\fB\fR
Query all packages that provide the \fICAPABILITY\fR capability.
.TP
\fB--whatrequires \fICAPABILITY\fB\fR
Query all packages that requires \fICAPABILITY\fR for proper functioning.
.SS "PACKAGE QUERY OPTIONS:"
.PP
.TP
\fB--changelog\fR
Display change information for the package.
.TP
\fB-c, --configfiles\fR
List only configuration files (implies \fB-l\fR).
.TP
\fB-d, --docfiles\fR
List only documentation files (implies \fB-l\fR).
.TP
\fB--dump\fR
Dump file information as follows:
.sp
.RS

.nf
path size mtime md5sum mode owner group isconfig isdoc rdev symlink
	
.fi
.RE

This option must be used with at least one of
\fB-l\fR,
\fB-c\fR,
\fB-d\fR.
.TP
\fB--filesbypkg\fR
List all the files in each selected package.
.TP
\fB-i, --info\fR
Display package information, including name, version, and description.
This uses the \fB--queryformat\fR if one was specified.
.TP
\fB--last\fR
Orders the package listing by install time such that the latest
packages are at the top.
.TP
\fB-l, --list\fR
List files in package.
.TP
\fB--provides\fR
List capabilities this package provides.
.TP
\fB-R, --requires\fR
List packages on which this package depends.
.TP
\fB--scripts\fR
List the package specific scriptlet(s) that are used as part
of the installation and uninstallation processes.
.TP
\fB-s, --state\fR
Display the \fIstates\fR of files in the package
(implies \fB-l\fR).  The state of each file is one of
\fInormal\fR,
\fInot installed\fR, or
\fIreplaced\fR.
.TP
\fB--triggers, --triggerscripts\fR
Display the trigger scripts, if any, which are contained in
the package.
.SS "VERIFY OPTIONS"
.PP
The general form of an rpm verify command is 
.PP
\fBrpm\fR {\fB-V|--verify\fR} [\fBselect-options\fR] [\fB--nodeps\fR] [\fB--nofiles\fR] [\fB--nomd5\fR] [\fB--noscripts\fR]
.PP
Verifying a package compares information about the installed files in
the package with information about the files taken from the package
metadata stored in the rpm database.  Among other things, verifying
compares the size, MD5 sum, permissions, type, owner and group of
each file.  Any discrepencies are displayed.
Files that were not installed from the package, for example,
documentation files excluded on installation using the
"\fB--excludedocs\fR" option,
will be silently ignored.
.PP
The package selection options are the same as for package
querying (including package manifest files as arguments).
Other options that can be used only in verify mode are:
.TP
\fB--nodeps\fR
Don't verify dependencies.
.TP
\fB--nofiles\fR
Don't verify files.
.TP
\fB--nomd5\fR
Don't verify file MD5 checksums.
.TP
\fB--noscripts\fR
Don't execute the \fB%verifyscript\fR scriptlet (if any).
.PP
The format of the output is a string of 8 characters, a possible
"\fBc\fR" denoting a configuration file, and then
the file name. Each of the 8 characters denotes the result of
a comparison of attribute(s) of the file to the value of those
attribute(s) recorded in the database.
A single
"\fB.\fR" (period)
means the test passed, while a single
"\fB?\fR"
indicates the test could not be performed (e.g. file permissions
prevent reading). Otherwise, the (mnemonically
em\fBB\fRoldened) character denotes failure of
the corresponding \fB--verify\fR test:

\fBS\fR
file \fBS\fRize differs

\fBM\fR
\fBM\fRode differs (includes permissions and file type)

\fB5\fR
MD\fB5\fR sum differs

\fBD\fR
\fBD\fRevice major/minor number mis-match

\fBL\fR
read\fBL\fRink(2) path mis-match

\fBU\fR
\fBU\fRser ownership differs

\fBG\fR
\fBG\fRroup ownership differs

\fBT\fR
m\fBT\fRime differs
.SS "SIGNATURE CHECKING"
.PP
The general form of an rpm signature check command is 
.PP
\fBrpm\fR \fB--checksig\fR [\fB--nogpg\fR] [\fB--nopgp\fR] [\fB--nomd5\fR] \fB\fIPACKAGE_FILE\fB\fR\fI ...\fR
.PP
This checks the GPG signature of package
\fIPACKAGE_FILE\fR to ensure
its integrity and origin. GPG configuration information is
read from configuration files.  See the section on GPG SIGNATURES
for details.
.SS "ERASE OPTIONS"
.PP
The general form of an rpm erase command is 
.PP
\fBrpm\fR {\fB-e|--erase\fR} [\fB--allmatches\fR] [\fB--nodeps\fR] [\fB--noscripts\fR] [\fB--notriggers\fR] [\fB--test\fR] \fB\fIPACKAGE_NAME\fB\fR\fI ...\fR
.PP
The following options may also be used:
.TP
\fB--allmatches\fR
Remove all versions of the package which match
\fIPACKAGE_NAME\fR. Normally an
error is issued if \fIPACKAGE_NAME\fR
matches multiple packages.
.TP
\fB--nodeps\fR
Don't check dependencies before uninstalling the packages.
.TP
\fB--noscripts\fR
.TP
\fB--nopreun\fR
.TP
\fB--nopostun\fR
Don't execute the scriptlet of the same name.
The \fB--noscripts\fR option during package erase is
equivalent to

\fB--nopreun\fR
\fB--nopostun\fR

and turns off the execution of the corresponding
\fB%preun\fR, and
\fB%postun\fR
scriptlet(s).
.TP
\fB--notriggers\fR
.TP
\fB--notriggerun\fR
.TP
\fB--notriggerpostun\fR
Don't execute any trigger scriptlet of the named type.
The \fB--notriggers\fR option is equivalent to

\fB--notriggerun\fR
\fB--notriggerpostun\fR

and turns off execution of the corresponding
\fB%triggerun\fR, and
\fB%triggerpostun\fR
scriptlet(s).
.TP
\fB--test\fR
Don't really uninstall anything, just go through the motions.
Useful in conjunction with the \fB-vv\fR option
for debugging.
.SS "BUILD OPTIONS"
.PP
The general form of an rpm build command is 
.PP
\fBrpm\fR {\fB-b\fISTAGE\fB|-t\fISTAGE\fB\fR} [\fBbuild-options\fR] \fB\fIFILE\fB\fR\fI ...\fR
.PP
The argument used is \fB-b\fR if a spec file is being
used to build the package and \fB-t\fR if \fBrpm\fR
should look inside of a (possibly compressed) tar file for
the spec file to use. After the first argument, the next
character (\fISTAGE\fR) specifies the stages
of building and packaging to be done and is one of:
.TP
\fB-ba\fR
Build binary and source packages (after doing the %prep, %build, and
%install stages).
.TP
\fB-bb\fR
Build a binary package (after doing the %prep, %build, and %install
stages).
.TP
\fB-bp\fR
Executes the "%prep" stage from the spec file. Normally this
involves unpacking the sources and applying any patches.
.TP
\fB-bc\fR
Do the "%build" stage from the spec file (after doing the %prep stage).
This generally involves the equivalent of a "make".
.TP
\fB-bi\fR
Do "%install" and "%check" stages from the spec file (after doing the
%prep and %build stages).  This generally involves the equivalent of a
"make install".
.TP
\fB-bt\fR
Do just the "%check" stage from the spec file.
.TP
\fB-bl\fR
Do a "list check".  The "%files" section from the spec file is
macro expanded, and checks are made to verify that each file
exists.
.TP
\fB-bs\fR
Build just the source package.
.PP
The following options may also be used:
.TP
\fB--buildroot \fIDIRECTORY\fB\fR
When building a package, override the BuildRoot tag with directory
\fIDIRECTORY\fR.
.TP
\fB--clean\fR
Remove the build tree after the packages are made.
.TP
\fB--nobuild\fR
Do not execute any build stages. Useful for testing out spec files.
.TP
\fB--rmsource\fR
Remove the sources after the build (may also be
used standalone, e.g. "\fBrpm\fR \fB--rmsource foo.spec\fR").
.TP
\fB--rmspec\fR
Remove the spec file after the build (may also be
used standalone, eg. "\fBrpm\fR \fB--rmspec foo.spec\fR").
.TP
\fB--short-circuit\fR
Skip straight to specified stage (i.e., skip all stages leading
up to the specified stage).  Only valid with \fB-bc\fR
and \fB-bi\fR.
.TP
\fB--sign\fR
Embed a GPG signature in the package. This signature can be used
to verify the integrity and the origin of the package.  See the
section on GPG SIGNATURES for configuration details.
.TP
\fB--target \fIPLATFORM\fB\fR
When building the package, interpret \fIPLATFORM\fR
as \fBarch-vendor-os\fR and set the macros
\fB%_target\fR,
\fB%_target_arch\fR, and
\fB%_target_os\fR
accordingly.
.SS "REBUILD AND RECOMPILE OPTIONS"
.PP
There are two other ways to invoke building with rpm:
.PP
\fBrpm\fR {\fB--rebuild|--recompile\fR} \fB\fISOURCEPKG\fB\fR\fI ...\fR
.PP
When invoked this way, \fBrpm\fR installs the named source
package, and does a prep, compile and install.  In addition,
\fB--rebuild\fR builds a new binary package. When the build
has completed, the build directory is removed (as in
\fB--clean\fR) and the the sources and spec file for
the package are removed.
.SS "SIGNING A PACKAGE"
.PP
\fBrpm\fR {\fB--addsign|--resign\fR} \fB\fIPACKAGE_FILE\fB\fR\fI ...\fR
.PP
The \fB--addsign\fR option generates and inserts
new signatures for each package.  Any existing signatures will
be discarded.
.PP
The \fB--resign\fR option generates and appends signatures
for the listed packages while preserving the existing signatures.
.SS "GPG SIGNATURES"
.PP
In order to use the signature feature, \fBrpm\fR
must be configured to run GPG and be able to find a public key
ring with Red Hat (or other vendor) public keys. By default,
\fBrpm\fR uses the same conventions as GPG
to find key rings, namely the \fB$GPGPATH\fR environment
variable.  If your key rings are not located where GPG expects
them to be, you will need to configure the macro
\fB%_gpg_path\fR
to be the location of the GPG key rings to use.
.PP
If you want to be able to sign packages you create yourself, you
also need to create your own public and secret key pair (see the
GPG manual). You will also need to configure the macros
.TP
\fB%_signature\fR
The signature type.  Right now only gpg and pgp are supported.
.TP
\fB%_gpg_name\fR
The name of the "user" whose key you wish to use to sign your packages.
.PP
When building packages you then add \fB--sign\fR to
the command line. You will be prompted for your pass phrase, and
your package will be built and signed.  For example, to be able
to use GPG to sign packages as the user
\fI"John Doe <jdoe@foo.com>"\fR
from the key rings located in \fI/etc/rpm/.gpg\fR
using the executable \fI/usr/bin/gpg\fR you would include
.PP

.nf
%_signature gpg
%_gpg_path /etc/rpm/.gpg
%_gpg_name John Doe <jdoe@foo.com>
%_gpgbin /usr/bin/gpg
.fi
.PP
in a macro configuration file. Use \fI/etc/rpm/macros\fR
for per-system configuration and \fI~/.rpmmacros\fR
for per-user configuration. 
.SS "REBUILD DATABASE OPTIONS"
.PP
The general form of an rpm rebuild database command is 
.PP
\fBrpm\fR {\fB--initdb|--rebuilddb\fR} [\fB-v\fR] [\fB--dbpath\ \fIDIRECTORY\fB\fR] [\fB--root\ \fIDIRECTORY\fB\fR]
.PP
Use \fB--initdb\fR to create a new database, use
\fB--rebuilddb\fR to rebuild the database indices from
the installed package headers.
.SS "SHOWRC"
.PP
The command
.PP
\fBrpm\fR \fB--showrc\fR
.PP
shows the values \fBrpm\fR will use for all of the
options are currently set in
\fIrpmrc\fR and
\fImacros\fR
configuration file(s).
.SS "FTP/HTTP OPTIONS"
.PP
\fBrpm\fR can act as an FTP and/or HTTP client so
that packages can be queried or installed from the internet.
Package files for install, upgrade, and query operations may be
specified as an
\fBftp\fR or
\fBhttp\fR
style URL:  
.PP
ftp://USER:PASSWORD@HOST:PORT/path/to/package.rpm
.PP
If the \fB:PASSWORD\fR portion is omitted, the password will be
prompted for (once per user/hostname pair). If both the user and
password are omitted, anonymous \fBftp\fR is used.
In all cases, passive (PASV) \fBftp\fR transfers are
performed.
.PP
\fBrpm\fR allows the following options to be used with
ftp URLs:
.TP
\fB--ftpproxy \fIHOST\fB\fR
The host \fIHOST\fR will be used as a proxy server
for all ftp transfers, which allows users to ftp through firewall
machines which use proxy systems. This option may also be specified
by configuring the macro \fB%_ftpproxy\fR.
.TP
\fB--ftpport \fIHOST\fB\fR
The TCP \fIPORT\fR number to use for
the ftp connection on the proxy ftp server instead of the default
port. This option may also be specified by configuring the macro
\fB%_ftpport\fR.
.PP
\fBrpm\fR allows the following options to be used with
\fBhttp\fR URLs:
.TP
\fB--httpproxy \fIHOST\fB\fR
The host \fIHOST\fR will be used as
a proxy server for all \fBhttp\fR transfers. This
option may also be specified by configuring the macro
\fB%_httpproxy\fR.
.TP
\fB--httpport \fIPORT\fB\fR
The TCP \fIPORT\fR number to use for the
\fBhttp\fR connection on the proxy http server instead
of the default port. This option may also be specified by configuring
the macro \fB%_httpport\fR.
.SH "FILES"
.PP
\fI/usr/lib/rpm/rpmrc\fR

\fI/etc/rpmrc\fR

\fI~/.rpmrc\fR

\fI/usr/lib/rpm/macros\fR

\fI/etc/rpm/macros\fR

\fI~/.rpmmacros\fR

\fI/var/lib/rpm/Conflictname\fR

\fI/var/lib/rpm/Basenames\fR

\fI/var/lib/rpm/Group\fR

\fI/var/lib/rpm/Name\fR

\fI/var/lib/rpm/Packages\fR

\fI/var/lib/rpm/Providename\fR

\fI/var/lib/rpm/Requirename\fR

\fI/var/lib/rpm/Triggername\fR

\fI/var/tmp/rpm*\fR
.SH "SEE ALSO"

\fBpopt\fR(3),

\fBrpm2cpio\fR(8),

\fBrpmbuild\fR(8),

\fBhttp://www.rpm.org/\fR
.SH "AUTHORS"

Marc Ewing <marc@redhat.com>

Jeff Johnson <jbj@redhat.com>

Erik Troan <ewt@redhat.com>
